﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using Sublight.Plugins.SubtitleProvider;

namespace SublightPlugin.Test
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                var module = System.Diagnostics.Process.GetCurrentProcess().MainModule;
                if (module == null)
                {
                    throw new Exception("module = null");
                }

                var fi = new FileInfo(module.FileName);
                if (fi.Directory == null)
                {
                    throw new Exception("module, Directory = null");
                }

                Compression.Unrar.CmdLine = Path.Combine(fi.Directory.FullName, "unrar.exe");

                TestRunner.Run(typeof (TestSubscene));
            }
            catch (Exception ex)
            {
                Console.WriteLine("Exception: {0}", ex.Message);
            }

            Console.WriteLine("Press ENTER to exit...");
            Console.ReadLine();
        }
    }
}
